home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  36.6 KB  |  1,110 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Monday, December 2, 1991 at 5:14 PM
  5.  Script.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1986-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __SCRIPT__
  16. #define __SCRIPT__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22. #ifndef __OSUTILS__
  23. #include <OSUtils.h>
  24. #endif
  25.  
  26.  
  27. enum {
  28.  
  29.  
  30. /* Script System constants */
  31.  smSystemScript = -1,                /*designates system script.*/
  32.  smCurrentScript = -2,                /*designates current font script.*/
  33.  smAllScripts = -3,                    /*designates any script.*/
  34.  smRoman = 0,                        /*Roman*/
  35.  smJapanese = 1,                    /*Japanese*/
  36.  smTradChinese = 2,                    /*Traditional Chinese*/
  37.  smKorean = 3,                        /*Korean*/
  38.  smArabic = 4,                        /*Arabic*/
  39.  smHebrew = 5,                        /*Hebrew*/
  40.  smGreek = 6,                        /*Greek*/
  41.  smCyrillic = 7,                    /*Cyrillic*/
  42.  smRSymbol = 8,                        /*Right-left symbol*/
  43.  smDevanagari = 9,                    /*Devanagari*/
  44.  smGurmukhi = 10,                    /*Gurmukhi*/
  45.  smGujarati = 11,                    /*Gujarati*/
  46.  smOriya = 12,                        /*Oriya*/
  47.  smBengali = 13,                    /*Bengali*/
  48.  smTamil = 14,                        /*Tamil*/
  49.  smTelugu = 15,                        /*Telugu*/
  50.  smKannada = 16                        /*Kannada/Kanarese*/
  51. };
  52. enum {
  53.  smMalayalam = 17,                    /*Malayalam*/
  54.  smSinhalese = 18,                    /*Sinhalese*/
  55.  smBurmese = 19,                    /*Burmese*/
  56.  smKhmer = 20,                        /*Khmer/Cambodian*/
  57.  smThai = 21,                        /*Thai*/
  58.  smLaotian = 22,                    /*Laotian*/
  59.  smGeorgian = 23,                    /*Georgian*/
  60.  smArmenian = 24,                    /*Armenian*/
  61.  smSimpChinese = 25,                /*Simplified Chinese*/
  62.  smTibetan = 26,                    /*Tibetan*/
  63.  smMongolian = 27,                    /*Mongolian*/
  64.  smGeez = 28,                        /*Geez/Ethiopic*/
  65.  smEthiopic = 28,                    /*Synonym for smGeez*/
  66.  smEastEurRoman = 29,                /*Synonym for smSlavic*/
  67.  smVietnamese = 30,                    /*Vietnamese*/
  68.  smExtArabic = 31,                    /*extended Arabic*/
  69.  smUninterp = 32,                    /*uninterpreted symbols, e.g. palette symbols*/
  70.  
  71. /*Obsolete names for script systems (kept for backward compatibility)*/
  72.  smChinese = 2,                        /*(use smTradChinese or smSimpChinese)*/
  73.  smRussian = 7,                        /*(old name for smCyrillic)*/
  74.  
  75. /* smMaldivian = 25;         (no more smMaldivian!)*/
  76.  smAmharic = 28                        /*(old name for smGeez)*/
  77. };
  78. enum {
  79.  smSlavic = 29,                        /*(old name for smEastEurRoman)*/
  80.  smSindhi = 31,                        /*(old name for smExtArabic)*/
  81.  
  82. /* Calendar Codes */
  83.  calGregorian = 0,
  84.  calArabicCivil = 1,
  85.  calArabicLunar = 2,
  86.  calJapanese = 3,
  87.  calJewish = 4,
  88.  calCoptic = 5,
  89.  calPersian = 6,
  90.  
  91. /* Integer Format Codes */
  92.  intWestern = 0,
  93.  intArabic = 1,
  94.  intRoman = 2,
  95.  intJapanese = 3,
  96.  intEuropean = 4,
  97.  intOutputMask = 0x8000,
  98.  
  99. /* CharByte byte types */
  100.  smSingleByte = 0,
  101.  smFirstByte = -1,
  102.  smLastByte = 1,
  103.  smMiddleByte = 2,
  104.  
  105. /* CharType field masks */
  106.  smcTypeMask = 0x000F
  107. };
  108. enum {
  109.  smcReserved = 0x00F0,
  110.  smcClassMask = 0x0F00,
  111.  smcOrientationMask = 0x1000,        /*two-byte script glyph orientation*/
  112.  smcRightMask = 0x2000,
  113.  smcUpperMask = 0x4000,
  114.  smcDoubleMask = 0x8000,
  115.  
  116. /* Basic CharType character types */
  117.  smCharPunct = 0x0000,
  118.  smCharAscii = 0x0001,
  119.  smCharEuro = 0x0007,
  120.  smCharExtAscii = 0x0007,            /* More correct synonym for smCharEuro */
  121.  
  122. /* Additional CharType character types for script systems */
  123.  smCharKatakana = 0x0002,            /*Japanese Katakana*/
  124.  smCharHiragana = 0x0003,            /*Japanese Hiragana*/
  125.  smCharIdeographic = 0x0004,        /*Hanzi, Kanji, Hanja*/
  126.  smCharTwoByteGreek = 0x0005,        /*2-byte Greek in Far East systems*/
  127.  smCharTwoByteRussian = 0x0006,        /*2-byte Cyrillic in Far East systems*/
  128.  smCharBidirect = 0x0008,            /*Arabic/Hebrew*/
  129.  smCharHangul = 0x000C,                /*Korean Hangul*/
  130.  smCharJamo = 0x000D,                /*Korean Jamo*/
  131.  
  132. /* old names for some of above, for backward compatibility */
  133.  smCharFISKana = 0x0002,            /*Katakana*/
  134.  smCharFISGana = 0x0003                /*Hiragana*/
  135. };
  136. enum {
  137.  smCharFISIdeo = 0x0004,            /*Hanzi, Kanji, Hanja*/
  138.  smCharFISGreek = 0x0005,            /*2-byte Greek in Far East systems*/
  139.  smCharFISRussian = 0x0006,            /*2-byte Cyrillic in Far East systems*/
  140.  
  141. /* CharType classes for punctuation (smCharPunct) */
  142.  smPunctNormal = 0x0000,
  143.  smPunctNumber = 0x0100,
  144.  smPunctSymbol = 0x0200,
  145.  smPunctBlank = 0x0300,
  146.  
  147. /* Additional CharType classes for punctuation in two-byte systems */
  148.  smPunctRepeat = 0x0400,            /* repeat marker */
  149.  smPunctGraphic = 0x0500,            /* line graphics */
  150.  
  151. /* CharType Katakana and Hiragana classes for two-byte systems */
  152.  smKanaSmall = 0x0100,                /*small kana character*/
  153.  smKanaHardOK = 0x0200,                /*can have dakuten*/
  154.  smKanaSoftOK = 0x0300,                /*can have dakuten or han-dakuten*/
  155.  
  156. /* CharType Ideographic classes for two-byte systems */
  157.  smIdeographicLevel1 = 0x0000,        /*level 1 char*/
  158.  smIdeographicLevel2 = 0x0100,        /*level 2 char*/
  159.  smIdeographicUser = 0x0200,        /*user char*/
  160.  
  161. /* old names for above, for backward compatibility */
  162.  smFISClassLvl1 = 0x0000,            /*level 1 char*/
  163.  smFISClassLvl2 = 0x0100,            /*level 2 char*/
  164.  smFISClassUser = 0x0200,            /*user char*/
  165.  
  166. /* CharType Jamo classes for Korean systems */
  167.  smJamoJaeum = 0x0000,                /*simple consonant char*/
  168.  smJamoBogJaeum = 0x0100            /*complex consonant char*/
  169. };
  170. enum {
  171.  smJamoMoeum = 0x0200,                /*simple vowel char*/
  172.  smJamoBogMoeum = 0x0300,            /*complex vowel char*/
  173.  
  174. /* CharType glyph orientation for two-byte systems */
  175.  smCharHorizontal = 0x0000,            /* horizontal character form, or for both */
  176.  smCharVertical = 0x1000,            /* vertical character form */
  177.  
  178. /* CharType directions */
  179.  smCharLeft = 0x0000,
  180.  smCharRight = 0x2000,
  181.  
  182. /* CharType case modifers */
  183.  smCharLower = 0x0000,
  184.  smCharUpper = 0x4000,
  185.  
  186. /* CharType character size modifiers (1 or multiple bytes). */
  187.  smChar1byte = 0x0000,
  188.  smChar2byte = 0x8000,
  189.  
  190. /* Char2Pixel directions */
  191.  smLeftCaret = 0,                    /*Place caret for left block*/
  192.  smRightCaret = -1,                    /*Place caret for right block*/
  193.  smHilite = 1,                        /*Direction is TESysJust*/
  194.  
  195. /* Transliterate target types for Roman */
  196.  smTransAscii = 0,                    /*convert to ASCII*/
  197.  smTransNative = 1,                    /*convert to font script*/
  198.  smTransCase = 0xFE,                /*convert case for all text*/
  199.  smTransSystem = 0xFF,                /*convert to system script*/
  200.  
  201. /* Transliterate target types for two-byte scripts */
  202.  smTransAscii1 = 2,                    /*1-byte Roman*/
  203.  smTransAscii2 = 3,                    /*2-byte Roman*/
  204.  smTransKana1 = 4                    /*1-byte Japanese Katakana*/
  205. };
  206. enum {
  207.  smTransKana2 = 5,                    /*2-byte Japanese Katakana*/
  208.  smTransGana2 = 7,                    /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  209.  smTransHangul2 = 8,                /*2-byte Korean Hangul*/
  210.  smTransJamo2 = 9,                    /*2-byte Korean Jamo*/
  211.  smTransBopomofo2 = 10,                /*2-byte Chinese Bopomofo*/
  212.  
  213. /* Transliterate target modifiers */
  214.  smTransLower = 0x4000,                /*target becomes lowercase*/
  215.  smTransUpper = 0x8000,                /*target becomes uppercase*/
  216.  
  217. /* Transliterate source mask - general */
  218.  smMaskAll = 0xFFFFFFFF,            /*Convert all text*/
  219.  
  220. /* Transliterate source masks */
  221.  smMaskAscii = 0x00000001,            /*2^smTransAscii*/
  222.  smMaskNative = 0x00000002,            /*2^smTransNative*/
  223.  
  224. /* Transliterate source masks for two-byte scripts */
  225.  smMaskAscii1 = 0x00000004,            /*2^smTransAscii1*/
  226.  smMaskAscii2 = 0x00000008,            /*2^smTransAscii2*/
  227.  smMaskKana1 = 0x00000010,            /*2^smTransKana1*/
  228.  smMaskKana2 = 0x00000020,            /*2^smTransKana2*/
  229.  smMaskGana2 = 0x00000080,            /*2^smTransGana2*/
  230.  smMaskHangul2 = 0x00000100,        /*2^smTransHangul2*/
  231.  smMaskJamo2 = 0x00000200,            /*2^smTransJamo2*/
  232.  smMaskBopomofo2 = 0x00000400,        /*2^smTransBopomofo2*/
  233.  
  234. /* Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls. */
  235.  smNotInstalled = 0,                /*routine not available in script*/
  236.  smBadVerb = -1                        /*Bad verb passed to a routine*/
  237. };
  238. enum {
  239.  smBadScript = -2,                    /*Bad script code passed to a routine*/
  240.  
  241. /* Values for script redraw flag. */
  242.  smRedrawChar = 0,                    /*Redraw character only*/
  243.  smRedrawWord = 1,                    /*Redraw entire word (2-byte systems)*/
  244.  smRedrawLine = -1,                    /*Redraw entire line (bidirectional systems)*/
  245.  
  246. /* GetEnvirons and SetEnvirons verbs */
  247.  smVersion = 0,                        /*Script Manager version number*/
  248.  smMunged = 2,                        /*Globals change count*/
  249.  smEnabled = 4,                        /*Count of enabled scripts, incl Roman*/
  250.  smBidirect = 6,                    /*At least one bidirectional script*/
  251.  smFontForce = 8,                    /*Force font flag*/
  252.  smIntlForce = 10,                    /*Force intl flag*/
  253.  smForced = 12,                        /*Script was forced to system script*/
  254.  smDefault = 14,                    /*Script was defaulted to Roman script*/
  255.  smPrint = 16,                        /*Printer action routine*/
  256.  smSysScript = 18,                    /*System script*/
  257.  smLastScript = 20,                    /*Last keyboard script*/
  258.  smKeyScript = 22,                    /*Keyboard script*/
  259.  smSysRef = 24,                        /*System folder refNum*/
  260.  smKeyCache = 26,                    /*obsolete*/
  261.  smKeySwap = 28,                    /*Swapping table handle*/
  262.  smGenFlags = 30                    /*General flags long*/
  263. };
  264. enum {
  265.  smOverride = 32,                    /*Script override flags*/
  266.  smCharPortion = 34,                /*Ch vs SpExtra proportion*/
  267.  
  268. /* New for System 7.0: */
  269.  smDoubleByte = 36,                    /*Flag for double-byte script installed*/
  270.  smKCHRCache = 38,                    /*Returns pointer to KCHR cache*/
  271.  smRegionCode = 40,                    /*Returns current region code (verXxx)*/
  272.  
  273. /* GetScript and SetScript verbs.
  274. Note: Verbs private to script systems are negative, while
  275. those general across script systems are non-negative. */
  276.  smScriptVersion = 0,                /*Script software version*/
  277.  smScriptMunged = 2,                /*Script entry changed count*/
  278.  smScriptEnabled = 4,                /*Script enabled flag*/
  279.  smScriptRight = 6,                    /*Right to left flag*/
  280.  smScriptJust = 8,                    /*Justification flag*/
  281.  smScriptRedraw = 10,                /*Word redraw flag*/
  282.  smScriptSysFond = 12,                /*Preferred system font*/
  283.  smScriptAppFond = 14,                /*Preferred Application font*/
  284.  smScriptBundle = 16,                /*Beginning of itlb verbs*/
  285.  smScriptNumber = 16,                /*Script itl0 id*/
  286.  smScriptDate = 18,                    /*Script itl1 id*/
  287.  smScriptSort = 20,                    /*Script itl2 id*/
  288.  smScriptFlags = 22,                /*flags word*/
  289.  smScriptToken = 24,                /*Script itl4 id*/
  290.  smScriptEncoding = 26                /*id of optional itl5, if present*/
  291. };
  292. enum {
  293.  smScriptLang = 28,                    /*Current language for script*/
  294.  smScriptNumDate = 30,                /*Script Number/Date formats.*/
  295.  smScriptKeys = 32,                    /*Script KCHR id*/
  296.  smScriptIcon = 34,                    /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  297.  smScriptPrint = 36,                /*Script printer action routine*/
  298.  smScriptTrap = 38,                    /*Trap entry pointer*/
  299.  smScriptCreator = 40,                /*Script file creator*/
  300.  smScriptFile = 42,                    /*Script file name*/
  301.  smScriptName = 44,                    /*Script name*/
  302.  
  303. /* There is a hole here for old Kanji private verbs 46-76 
  304.  
  305.  New for System 7.0: */
  306.  smScriptMonoFondSize = 78,            /*default monospace FOND (hi) & size (lo)*/
  307.  smScriptPrefFondSize = 80,            /*preferred FOND (hi) & size (lo)*/
  308.  smScriptSmallFondSize = 82,        /*default small FOND (hi) & size (lo)*/
  309.  smScriptSysFondSize = 84,            /*default system FOND (hi) & size (lo)*/
  310.  smScriptAppFondSize = 86,            /*default app FOND (hi) & size (lo)*/
  311.  smScriptHelpFondSize = 88,            /*default Help Mgr FOND (hi) & size (lo)*/
  312.  smScriptValidStyles = 90,            /*mask of valid styles for script*/
  313.  smScriptAliasStyle = 92,            /*style (set) to use for aliases*/
  314.  
  315. /* Negative verbs for KeyScript */
  316.  smKeyNextScript = -1,                /* Switch to next available script */
  317.  smKeySysScript = -2,                /* Switch to the system script */
  318.  smKeySwapScript = -3                /* Switch to previously-used script */
  319. };
  320. enum {
  321.  
  322. /* New for System 7.0: */
  323.  smKeyNextKybd = -4,                /* Switch to next keyboard in current keyscript */
  324.  smKeySwapKybd = -5,                /* Switch to previously-used keyboard in current keyscript */
  325.  
  326.  smKeyDisableKybds = -6,            /* Disable keyboards not in system or Roman script */
  327.  smKeyEnableKybds = -7,                /* Re-enable keyboards for all enabled scripts */
  328.  smKeyToggleInline = -8,            /* Toggle inline input for current keyscript */
  329.  smKeyToggleDirection = -9,            /* Toggle default line direction (TESysJust) */
  330.  smKeyNextInputMethod = -10,        /* Switch to next input method in current keyscript */
  331.  smKeySwapInputMethod = -11,        /* Switch to last-used input method in current keyscript */
  332.  
  333.  smKeyDisableKybdSwitch = -12,        /* Disable switching from the current keyboard */
  334.  
  335.  
  336. /* Bits in the smScriptFlags word
  337. (bits above 7 are non-static) */
  338.  smsfIntellCP = 0,                    /*Script has intelligent cut & paste*/
  339.  smsfSingByte = 1,                    /*Script has only single bytes*/
  340.  smsfNatCase = 2,                    /*Native chars have upper & lower case*/
  341.  smsfContext = 3,                    /*Script is contextual*/
  342.  smsfNoForceFont = 4,                /*Script will not force characters*/
  343.  smsfB0Digits = 5,                    /*Script has alternate digits at B0-B9*/
  344.  smsfAutoInit = 6,                    /*Auto initialize the script*/
  345.  smsfForms = 13,                    /*Uses contextual forms for letters*/
  346.  smsfLigatures = 14,                /*Uses contextual ligatures*/
  347.  smsfReverse = 15,                    /*Reverses native text, right-left*/
  348.  
  349. /* Bits in the smGenFlags long.
  350. First (high-order) byte is set from itlc flags byte. */
  351.  smfShowIcon = 31                    /*Show icon even if only one script*/
  352. };
  353. enum {
  354.  smfDualCaret = 30,                    /*Use dual caret for mixed direction text*/
  355.  smfNameTagEnab = 29,                /*Reserved for internal use*/
  356.  
  357. /* Roman script constants 
  358.  
  359.  The following are here for backward compatibility, but should not be used. 
  360.  This information should be obtained using GetScript. */
  361.  romanSysFond = 0x3FFF,                /*system font id number*/
  362.  romanAppFond = 3,                    /*application font id number*/
  363.  romanFlags = 0x0007,                /*roman settings*/
  364.  
  365. /* Script Manager font equates. */
  366.  smFondStart = 0x4000,                /*start from 16K*/
  367.  smFondEnd = 0xC000,                /*past end of range at 48K*/
  368.  
  369. /* Miscellaneous font equates. */
  370.  smUprHalfCharSet = 0x80,            /*first char code in top half of std char set*/
  371.  
  372. /* Character Set Extensions */
  373.  diaeresisUprY = 0xD9,
  374.  fraction = 0xDA,
  375.  intlCurrency = 0xDB,
  376.  leftSingGuillemet = 0xDC,
  377.  rightSingGuillemet = 0xDD,
  378.  fiLigature = 0xDE,
  379.  flLigature = 0xDF,
  380.  dblDagger = 0xE0,
  381.  centeredDot = 0xE1,
  382.  baseSingQuote = 0xE2,
  383.  baseDblQuote = 0xE3,
  384.  perThousand = 0xE4
  385. };
  386. enum {
  387.  circumflexUprA = 0xE5,
  388.  circumflexUprE = 0xE6,
  389.  acuteUprA = 0xE7,
  390.  diaeresisUprE = 0xE8,
  391.  graveUprE = 0xE9,
  392.  acuteUprI = 0xEA,
  393.  circumflexUprI = 0xEB,
  394.  diaeresisUprI = 0xEC,
  395.  graveUprI = 0xED,
  396.  acuteUprO = 0xEE,
  397.  circumflexUprO = 0xEF,
  398.  appleLogo = 0xF0,
  399.  graveUprO = 0xF1,
  400.  acuteUprU = 0xF2,
  401.  circumflexUprU = 0xF3,
  402.  graveUprU = 0xF4,
  403.  dotlessLwrI = 0xF5,
  404.  circumflex = 0xF6,
  405.  tilde = 0xF7,
  406.  macron = 0xF8
  407. };
  408. enum {
  409.  breveMark = 0xF9,
  410.  overDot = 0xFA,
  411.  ringMark = 0xFB,
  412.  cedilla = 0xFC,
  413.  doubleAcute = 0xFD,
  414.  ogonek = 0xFE,
  415.  hachek = 0xFF,
  416.  
  417. /* String2Date status values */
  418.  fatalDateTime = 0x8000,            /*String2Date and String2Time mask to a fatal error*/
  419.  longDateFound = 1,                    /*String2Date mask to long date found*/
  420.  leftOverChars = 2,                    /*String2Date & Time mask to warn of left over characters*/
  421.  sepNotIntlSep = 4,                    /*String2Date & Time mask to warn of non-standard separators*/
  422.  fieldOrderNotIntl = 8,                /*String2Date & Time mask to warn of non-standard field order*/
  423.  extraneousStrings = 16,            /*String2Date & Time mask to warn of unparsable strings in text*/
  424.  tooManySeps = 32,                    /*String2Date & Time mask to warn of too many separators*/
  425.  sepNotConsistent = 64,                /*String2Date & Time mask to warn of inconsistent separators*/
  426.  tokenErr = 0x8100,                    /*String2Date & Time mask for 'tokenizer err encountered'*/
  427.  cantReadUtilities = 0x8200,
  428.  dateTimeNotFound = 0x8400,
  429.  dateTimeInvalid = 0x8800,
  430.  
  431. /* TokenType values */
  432.  tokenIntl = 4                        /*the itl resource number of the tokenizer*/
  433. };
  434. enum {
  435.  tokenEmpty = -1,                    /*used internally as an empty flag*/
  436.  tokenUnknown = 0,                    /*chars that do not match a defined token type*/
  437.  tokenWhite = 1,                    /*white space*/
  438.  tokenLeftLit = 2,                    /*literal begin*/
  439.  tokenRightLit = 3,                    /*literal end*/
  440.  tokenAlpha = 4,                    /*alphabetic*/
  441.  tokenNumeric = 5,                    /*numeric*/
  442.  tokenNewLine = 6,                    /*new line*/
  443.  tokenLeftComment = 7,                /*open comment*/
  444.  tokenRightComment = 8,                /*close comment*/
  445.  tokenLiteral = 9,                    /*literal*/
  446.  tokenEscape = 10,                    /*character escape (e.g. '\' in "\n", "\t")*/
  447.  tokenAltNum = 11,                    /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  448.  tokenRealNum = 12,                    /*real number*/
  449.  tokenAltReal = 13,                    /*alternate real number*/
  450.  tokenReserve1 = 14,                /*reserved*/
  451.  tokenReserve2 = 15,                /*reserved*/
  452.  tokenLeftParen = 16,                /*open parenthesis*/
  453.  tokenRightParen = 17,                /*close parenthesis*/
  454.  tokenLeftBracket = 18                /*open square bracket*/
  455. };
  456. enum {
  457.  tokenRightBracket = 19,            /*close square bracket*/
  458.  tokenLeftCurly = 20,                /*open curly bracket*/
  459.  tokenRightCurly = 21,                /*close curly bracket*/
  460.  tokenLeftEnclose = 22,                /*open guillemet*/
  461.  tokenRightEnclose = 23,            /*close guillemet*/
  462.  tokenPlus = 24,
  463.  tokenMinus = 25,
  464.  tokenAsterisk = 26,                /*times/multiply*/
  465.  tokenDivide = 27,
  466.  tokenPlusMinus = 28,                /*plus or minus symbol*/
  467.  tokenSlash = 29,
  468.  tokenBackSlash = 30,
  469.  tokenLess = 31,                    /*less than symbol*/
  470.  tokenGreat = 32,                    /*greater than symbol*/
  471.  tokenEqual = 33,
  472.  tokenLessEqual2 = 34,                /*less than or equal, 2 characters (e.g. <=)*/
  473.  tokenLessEqual1 = 35,                /*less than or equal, 1 character*/
  474.  tokenGreatEqual2 = 36,                /*greater than or equal, 2 characters (e.g. >=)*/
  475.  tokenGreatEqual1 = 37,                /*greater than or equal, 1 character*/
  476.  token2Equal = 38                    /*double equal (e.g. ==)*/
  477. };
  478. enum {
  479.  tokenColonEqual = 39,                /*colon equal*/
  480.  tokenNotEqual = 40,                /*not equal, 1 character*/
  481.  tokenLessGreat = 41,                /*less/greater, Pascal not equal (e.g. <>)*/
  482.  tokenExclamEqual = 42,                /*exclamation equal, C not equal (e.g. !=)*/
  483.  tokenExclam = 43,                    /*exclamation point*/
  484.  tokenTilde = 44,                    /*centered tilde*/
  485.  tokenComma = 45,
  486.  tokenPeriod = 46,
  487.  tokenLeft2Quote = 47,                /*open double quote*/
  488.  tokenRight2Quote = 48,                /*close double quote*/
  489.  tokenLeft1Quote = 49,                /*open single quote*/
  490.  tokenRight1Quote = 50,                /*close single quote*/
  491.  token2Quote = 51,                    /*double quote*/
  492.  token1Quote = 52,                    /*single quote*/
  493.  tokenSemicolon = 53,
  494.  tokenPercent = 54,
  495.  tokenCaret = 55,
  496.  tokenUnderline = 56,
  497.  tokenAmpersand = 57,
  498.  tokenAtSign = 58
  499. };
  500. enum {
  501.  tokenBar = 59,                        /*vertical bar*/
  502.  tokenQuestion = 60,
  503.  tokenPi = 61,                        /*lower-case pi*/
  504.  tokenRoot = 62,                    /*square root symbol*/
  505.  tokenSigma = 63,                    /*capital sigma*/
  506.  tokenIntegral = 64,                /*integral sign*/
  507.  tokenMicro = 65,
  508.  tokenCapPi = 66,                    /*capital pi*/
  509.  tokenInfinity = 67,
  510.  tokenColon = 68,
  511.  tokenHash = 69,                    /*e.g. #*/
  512.  tokenDollar = 70,
  513.  tokenNoBreakSpace = 71,            /*non-breaking space*/
  514.  tokenFraction = 72,
  515.  tokenIntlCurrency = 73,
  516.  tokenLeftSingGuillemet = 74,
  517.  tokenRightSingGuillemet = 75,
  518.  tokenPerThousand = 76,
  519.  tokenEllipsis = 77,
  520.  tokenCenterDot = 78
  521. };
  522. enum {
  523.  tokenNil = 127,
  524.  delimPad = -2,
  525.  
  526. /* obsolete, misspelled token names kept for backward compatibility */
  527.  tokenTilda = 44,
  528.  tokenCarat = 55,
  529.  
  530. /* the NumberParts indices */
  531.  tokLeftQuote = 1,
  532.  tokRightQuote = 2,
  533.  tokLeadPlacer = 3,
  534.  tokLeader = 4,
  535.  tokNonLeader = 5,
  536.  tokZeroLead = 6,
  537.  tokPercent = 7,
  538.  tokPlusSign = 8,
  539.  tokMinusSign = 9,
  540.  tokThousands = 10,
  541.  tokSeparator = 12,                    /*11 is a reserved field*/
  542.  tokEscape = 13,
  543.  tokDecPoint = 14,
  544.  tokEPlus = 15,
  545.  tokEMinus = 16,
  546.  tokMaxSymbols = 31
  547. };
  548. enum {
  549.  
  550.  curNumberPartsVersion = 1,            /*current version of NumberParts record*/
  551.  fVNumber = 0,                        /*first version of NumFormatString*/
  552.  
  553. /* Date equates */
  554.  smallDateBit = 31,                    /*Restrict valid date/time to range of Time global*/
  555.  togChar12HourBit = 30,                /*If toggling hour by char, accept hours 1..12 only*/
  556.  togCharZCycleBit = 29,                /*Modifier for togChar12HourBit: accept hours 0..11 only*/
  557.  togDelta12HourBit = 28,            /*If toggling hour up/down, restrict to 12-hour range (am/pm)*/
  558.  genCdevRangeBit = 27,                /*Restrict date/time to range used by genl CDEV*/
  559.  validDateFields = -1,
  560.  maxDateField = 10,
  561.  
  562.  eraMask = 0x0001,
  563.  yearMask = 0x0002,
  564.  monthMask = 0x0004,
  565.  dayMask = 0x0008,
  566.  hourMask = 0x0010,
  567.  minuteMask = 0x0020,
  568.  secondMask = 0x0040,
  569.  dayOfWeekMask = 0x0080,
  570.  dayOfYearMask = 0x0100,
  571.  weekOfYearMask = 0x0200,
  572.  pmMask = 0x0400
  573. };
  574. enum {
  575.  dateStdMask = 0x007F,                /*default for ValidDate flags and ToggleDate TogglePB.togFlags*/
  576.  
  577. /* Toggle results */
  578.  toggleUndefined = 0,
  579.  toggleOK = 1,
  580.  toggleBadField = 2,
  581.  toggleBadDelta = 3,
  582.  toggleBadChar = 4,
  583.  toggleUnknown = 5,
  584.  toggleBadNum = 6,
  585.  toggleOutOfRange = 7,                /*synonym for toggleErr3*/
  586.  toggleErr3 = 7,
  587.  toggleErr4 = 8,
  588.  toggleErr5 = 9,
  589.  
  590. /* New constants for System 7.0:               
  591.  
  592.   Constants for truncWhere argument in TruncString and TruncText */
  593.  smTruncEnd = 0,                    /* Truncate at end */
  594.  smTruncMiddle = 0x4000,            /* Truncate in middle */
  595.  
  596. /* Constants for TruncString and TruncText results */
  597.  smNotTruncated = 0,                /* No truncation was necessary */
  598.  smTruncated = 1,                    /* Truncation performed */
  599.  smTruncErr = -1,                    /* General error */
  600.  
  601. /*Constants for styleRunPosition argument in NPortionText, NDrawJust,
  602.  NMeasureJust, NChar2Pixel, and NPixel2Char.*/
  603.  smOnlyStyleRun = 0,                /* This is the only style run on the line */
  604.  smLeftStyleRun = 1,                /* This is leftmost of multiple style runs on the line */
  605.  smRightStyleRun = 2                /* This is rightmost of multiple style runs on the line */
  606. };
  607. enum {
  608.  smMiddleStyleRun = 3                /* There are multiple style runs on the line and this 
  609.  is neither the leftmost nor the rightmost. */
  610. };
  611.  
  612. enum {tokenOK,tokenOverflow,stringOverflow,badDelim,badEnding,crash};
  613. typedef unsigned char TokenResults;
  614.  
  615. enum {eraField,yearField,monthField,dayField,hourField,minuteField,secondField,
  616.  dayOfWeekField,dayOfYearField,weekOfYearField,pmField,res1Field,res2Field,
  617.  res3Field};
  618. typedef unsigned char LongDateField;
  619.  
  620. enum {smBreakWord,smBreakChar,smBreakOverflow};
  621. typedef unsigned char StyledLineBreakCode;
  622.  
  623. enum {fPositive,fNegative,fZero};
  624. typedef unsigned char FormatClass;
  625.  
  626. enum {fFormatOK,fBestGuess,fOutOfSynch,fSpuriousChars,fMissingDelimiter,
  627.  fExtraDecimal,fMissingLiteral,fExtraExp,fFormatOverflow,fFormStrIsNAN,
  628.  fBadPartsTable,fExtraPercent,fExtraSeparator,fEmptyFormatString};
  629. typedef unsigned char FormatResultType;
  630.  
  631.  
  632. typedef char CharByteTable[256];
  633. typedef short ToggleResults;
  634.  
  635. struct BreakTable {
  636.  char charTypes[256];
  637.  short tripleLength;
  638.  short triples[1];
  639. };
  640.  
  641. typedef struct BreakTable BreakTable;
  642. typedef BreakTable *BreakTablePtr;
  643.  
  644. /* New NBreakTable for System 7.0: */
  645. struct NBreakTable {
  646.  signed char flags1;
  647.  signed char flags2;
  648.  short version;
  649.  short classTableOff;
  650.  short auxCTableOff;
  651.  short backwdTableOff;
  652.  short forwdTableOff;
  653.  short doBackup;
  654.  short reserved;
  655.  char charTypes[256];
  656.  short tables[1];
  657. };
  658.  
  659. typedef struct NBreakTable NBreakTable;
  660. typedef NBreakTable *NBreakTablePtr;
  661.  
  662. struct OffPair {
  663.  short offFirst;
  664.  short offSecond;
  665. };
  666.  
  667. typedef struct OffPair OffPair;
  668.  
  669.  
  670. typedef OffPair OffsetTable[3];
  671.  
  672. struct ItlcRecord {
  673.  short itlcSystem;                    /*default system script*/
  674.  short itlcReserved;                /*reserved*/
  675.  char itlcFontForce;                /*default font force flag*/
  676.  char itlcIntlForce;                /*default intl force flag*/
  677.  char itlcOldKybd;                    /*MacPlus intl keybd flag*/
  678.  char itlcFlags;                    /*general flags*/
  679.  short itlcIconOffset;                /*keyboard icon offset; not used in 7.0*/
  680.  char itlcIconSide;                    /*keyboard icon side; not used in 7.0*/
  681.  char itlcIconRsvd;                    /*rsvd for other icon info*/
  682.  short itlcRegionCode;                /*preferred verXxx code*/
  683.  char itlcReserved3[34];            /*for future use*/
  684. };
  685.  
  686. typedef struct ItlcRecord ItlcRecord;
  687.  
  688. struct ItlbRecord {
  689.  short itlbNumber;                    /*itl0 id number*/
  690.  short itlbDate;                    /*itl1 id number*/
  691.  short itlbSort;                    /*itl2 id number*/
  692.  short itlbFlags;                    /*Script flags*/
  693.  short itlbToken;                    /*itl4 id number*/
  694.  short itlbEncoding;                /*itl5 ID # (optional; char encoding)*/
  695.  short itlbLang;                    /*current language for script */
  696.  char itlbNumRep;                    /*number representation code*/
  697.  char itlbDateRep;                    /*date representation code */
  698.  short itlbKeys;                    /*KCHR id number*/
  699.  short itlbIcon;                    /*ID # of SICN or kcs#/kcs4/kcs8 suite.*/
  700. };
  701.  
  702. typedef struct ItlbRecord ItlbRecord;
  703.  
  704. /* New ItlbExtRecord structure for System 7.0 */
  705. struct ItlbExtRecord {
  706.  ItlbRecord base;                    /*un-extended ItlbRecord*/
  707.  long itlbLocalSize;                /*size of script's local record*/
  708.  short itlbMonoFond;                /*default monospace FOND ID*/
  709.  short itlbMonoSize;                /*default monospace font size*/
  710.  short itlbPrefFond;                /*preferred FOND ID*/
  711.  short itlbPrefSize;                /*preferred font size*/
  712.  short itlbSmallFond;                /*default small FOND ID*/
  713.  short itlbSmallSize;                /*default small font size*/
  714.  short itlbSysFond;                    /*default system FOND ID*/
  715.  short itlbSysSize;                    /*default system font size*/
  716.  short itlbAppFond;                    /*default application FOND ID*/
  717.  short itlbAppSize;                    /*default application font size*/
  718.  short itlbHelpFond;                /*default Help Mgr FOND ID*/
  719.  short itlbHelpSize;                /*default Help Mgr font size*/
  720.  Style itlbValidStyles;                /*set of valid styles for script*/
  721.  Style itlbAliasStyle;                /*style (set) to mark aliases*/
  722. };
  723.  
  724. typedef struct ItlbExtRecord ItlbExtRecord;
  725.  
  726. struct MachineLocation {
  727.  Fract latitude;
  728.  Fract longitude;
  729.  union{
  730.   char dlsDelta;                    /*signed byte; daylight savings delta*/
  731.   long gmtDelta;                    /*must mask - see documentation*/
  732.   }gmtFlags;
  733. };
  734.  
  735. typedef struct MachineLocation MachineLocation;
  736.  
  737.  
  738. typedef short String2DateStatus;
  739. typedef short TokenType;
  740. typedef TokenType DelimType[2];
  741. typedef TokenType CommentType[4];
  742.  
  743. struct TokenRec {
  744.  TokenType theToken;
  745.  Ptr position;                        /*pointer into original source*/
  746.  long length;                        /*length of text in original source*/
  747.  StringPtr stringPosition;            /*Pascal/C string copy of identifier*/
  748. };
  749.  
  750. typedef struct TokenRec TokenRec;
  751. typedef TokenRec *TokenRecPtr;
  752.  
  753. struct TokenBlock {
  754.  Ptr source;                        /*pointer to stream of characters*/
  755.  long sourceLength;                    /*length of source stream*/
  756.  Ptr tokenList;                        /*pointer to array of tokens*/
  757.  long tokenLength;                    /*maximum length of TokenList*/
  758.  long tokenCount;                    /*number tokens generated by tokenizer*/
  759.  Ptr stringList;                    /*pointer to stream of identifiers*/
  760.  long stringLength;                    /*length of string list*/
  761.  long stringCount;                    /*number of bytes currently used*/
  762.  Boolean doString;                    /*make strings & put into StringList*/
  763.  Boolean doAppend;                    /*append to TokenList rather than replace*/
  764.  Boolean doAlphanumeric;            /*identifiers may include numeric*/
  765.  Boolean doNest;                    /*do comments nest?*/
  766.  TokenType leftDelims[2];
  767.  TokenType rightDelims[2];
  768.  TokenType leftComment[4];
  769.  TokenType rightComment[4];
  770.  TokenType escapeCode;                /*escape symbol code*/
  771.  TokenType decimalCode;
  772.  Handle itlResource;                /*handle to itl4 resource of current script*/
  773.  long reserved[8];                    /*must be zero!*/
  774. };
  775.  
  776. typedef struct TokenBlock TokenBlock;
  777. typedef TokenBlock *TokenBlockPtr;
  778.  
  779. struct UntokenTable {
  780.  short len;
  781.  short lastToken;
  782.  short index[256];                    /*index table; last = lastToken*/
  783. };
  784.  
  785. typedef struct UntokenTable UntokenTable;
  786. typedef UntokenTable *UntokenTablePtr, **UntokenTableHandle;
  787.  
  788. struct DateCacheRecord {
  789.  short hidden[256];                    /*only for temporary use*/
  790. };
  791.  
  792. typedef struct DateCacheRecord DateCacheRecord;
  793. typedef DateCacheRecord *DateCachePtr;
  794.  
  795.  
  796. typedef comp LongDateTime;
  797.  
  798. union LongDateCvt {
  799.  comp c;
  800.  struct {
  801.   long lHigh;
  802.   long lLow;
  803.   } hl;
  804. };
  805.  
  806. typedef union LongDateCvt LongDateCvt;
  807.  
  808. union LongDateRec {
  809.  struct {
  810.   short era;
  811.   short year;
  812.   short month;
  813.   short day;
  814.   short hour;
  815.   short minute;
  816.   short second;
  817.   short dayOfWeek;
  818.   short dayOfYear;
  819.   short weekOfYear;
  820.   short pm;
  821.   short res1;
  822.   short res2;
  823.   short res3;
  824.   } ld;
  825.  short list[14];                    /*Index by LongDateField!*/
  826.  struct {
  827.   short eraAlt;
  828.   DateTimeRec oldDate;
  829.   } od;
  830. };
  831.  
  832. typedef union LongDateRec LongDateRec;
  833.  
  834.  
  835. typedef char DateDelta;
  836.  
  837. struct TogglePB {
  838.  long togFlags;                        /*caller normally sets low word to dateStdMask=$7F*/
  839.  ResType amChars;                    /*from 'itl0', but uppercased*/
  840.  ResType pmChars;                    /*from 'itl0', but uppercased*/
  841.  long reserved[4];
  842. };
  843.  
  844. typedef struct TogglePB TogglePB;
  845.  
  846.  
  847. typedef short FormatOrder[1];
  848. typedef FormatOrder *FormatOrderPtr;
  849. typedef short FormatStatus;
  850.  
  851. union WideChar {
  852.  char a[2];                            /*0 is the high order character*/
  853.  short b;
  854. };
  855.  
  856. typedef union WideChar WideChar;
  857.  
  858. struct WideCharArr {
  859.  short size;
  860.  WideChar data[10];
  861. };
  862.  
  863. typedef struct WideCharArr WideCharArr;
  864.  
  865. struct NumFormatString {
  866.  char fLength;
  867.  char fVersion;
  868.  char data[254];                    /*private data*/
  869. };
  870.  
  871. typedef struct NumFormatString NumFormatString;
  872.  
  873. struct Itl4Rec {
  874.  short flags;                        /*reserved*/
  875.  long resourceType;                    /*contains 'itl4'*/
  876.  short resourceNum;                    /*resource ID*/
  877.  short version;                        /*version number*/
  878.  long resHeader1;                    /*reserved*/
  879.  long resHeader2;                    /*reserved*/
  880.  short numTables;                    /*number of tables, one-based*/
  881.  long mapOffset;                    /*offset to table that maps byte to token*/
  882.  long strOffset;                    /*offset to routine that copies canonical string*/
  883.  long fetchOffset;                    /*offset to routine that gets next byte of character*/
  884.  long unTokenOffset;                /*offset to table that maps token to canonical string*/
  885.  long defPartsOffset;                /*offset to default number parts table*/
  886.  long resOffset6;                    /*reserved*/
  887.  long resOffset7;                    /*reserved*/
  888.  long resOffset8;                    /*reserved*/
  889. };
  890.  
  891. typedef struct Itl4Rec Itl4Rec;
  892. typedef Itl4Rec *Itl4Ptr, **Itl4Handle;
  893.  
  894. /* New NItl4Rec for System 7.0: */
  895. struct NItl4Rec {
  896.  short flags;                        /*reserved*/
  897.  long resourceType;                    /*contains 'itl4'*/
  898.  short resourceNum;                    /*resource ID*/
  899.  short version;                        /*version number*/
  900.  short format;                        /*format code*/
  901.  short resHeader;                    /*reserved*/
  902.  long resHeader2;                    /*reserved*/
  903.  short numTables;                    /*number of tables, one-based*/
  904.  long mapOffset;                    /*offset to table that maps byte to token*/
  905.  long strOffset;                    /*offset to routine that copies canonical string*/
  906.  long fetchOffset;                    /*offset to routine that gets next byte of character*/
  907.  long unTokenOffset;                /*offset to table that maps token to canonical string*/
  908.  long defPartsOffset;                /*offset to default number parts table*/
  909.  long whtSpListOffset;                /*offset to white space code list*/
  910.  long resOffset7;                    /*reserved*/
  911.  long resOffset8;                    /*reserved*/
  912.  short resLength1;                    /*reserved*/
  913.  short resLength2;                    /*reserved*/
  914.  short resLength3;                    /*reserved*/
  915.  short unTokenLength;                /*length of untoken table*/
  916.  short defPartsLength;                /*length of default number parts table*/
  917.  short whtSpListLength;                /*length of white space code list*/
  918.  short resLength7;                    /*reserved*/
  919.  short resLength8;                    /*reserved*/
  920. };
  921.  
  922. typedef struct NItl4Rec NItl4Rec;
  923. typedef NItl4Rec *NItl4Ptr, **NItl4Handle;
  924.  
  925. struct NumberParts {
  926.  short version;
  927.  WideChar data[31];                    /*index by [tokLeftQuote..tokMaxSymbols]*/
  928.  WideCharArr pePlus;
  929.  WideCharArr peMinus;
  930.  WideCharArr peMinusPlus;
  931.  WideCharArr altNumTable;
  932.  char reserved[20];
  933. };
  934.  
  935. typedef struct NumberParts NumberParts;
  936. typedef NumberParts *NumberPartsPtr;
  937.  
  938. struct FVector {
  939.  short start;
  940.  short length;
  941. };
  942.  
  943. typedef struct FVector FVector;
  944.  
  945.  
  946. typedef FVector TripleInt[3];        /* index by [fPositive..fZero] */
  947.  
  948. struct ScriptRunStatus {
  949.  char script;
  950.  char variant;
  951. };
  952.  
  953. typedef struct ScriptRunStatus ScriptRunStatus;
  954.  
  955.  
  956. /* New types for System 7.0:                
  957.  
  958.   type for truncWhere parameter in new TruncString, TruncText */
  959. typedef short TruncCode;
  960.  
  961. /* type for styleRunPosition parameter in NPixel2Char etc. */
  962. typedef short JustStyleCode;
  963.  
  964. #ifdef __cplusplus
  965. extern "C" {
  966. #endif
  967. pascal short FontScript(void)
  968.  = {0x2F3C,0x8200,0x0000,0xA8B5}; 
  969. pascal short IntlScript(void)
  970.  = {0x2F3C,0x8200,0x0002,0xA8B5}; 
  971. pascal void KeyScript(short code)
  972.  = {0x2F3C,0x8002,0x0004,0xA8B5}; 
  973. pascal short Font2Script(short fontNumber)
  974.  = {0x2F3C,0x8202,0x0006,0xA8B5}; 
  975. pascal long GetEnvirons(short verb)
  976.  = {0x2F3C,0x8402,0x0008,0xA8B5}; 
  977. pascal OSErr SetEnvirons(short verb,long param)
  978.  = {0x2F3C,0x8206,0x000A,0xA8B5}; 
  979. pascal long GetScript(short script,short verb)
  980.  = {0x2F3C,0x8404,0x000C,0xA8B5}; 
  981. pascal OSErr SetScript(short script,short verb,long param)
  982.  = {0x2F3C,0x8208,0x000E,0xA8B5}; 
  983. pascal short CharByte(Ptr textBuf,short textOffset)
  984.  = {0x2F3C,0x8206,0x0010,0xA8B5}; 
  985. pascal short CharType(Ptr textBuf,short textOffset)
  986.  = {0x2F3C,0x8206,0x0012,0xA8B5}; 
  987. pascal short Pixel2Char(Ptr textBuf,short textLen,short slop,short pixelWidth,
  988.  Boolean *leadingEdge)
  989.  = {0x2F3C,0x820E,0x0014,0xA8B5}; 
  990. pascal short Char2Pixel(Ptr textBuf,short textLen,short slop,short offset,
  991.  short direction)
  992.  = {0x2F3C,0x820C,0x0016,0xA8B5}; 
  993. pascal OSErr Transliterate(Handle srcHandle,Handle dstHandle,short target,
  994.  long srcMask)
  995.  = {0x2F3C,0x820E,0x0018,0xA8B5}; 
  996. pascal void FindWord(Ptr textPtr,short textLength,short offset,Boolean leadingEdge,
  997.  BreakTablePtr breaks,OffsetTable offsets)
  998.  = {0x2F3C,0x8012,0x001A,0xA8B5}; 
  999. pascal void HiliteText(Ptr textPtr,short textLength,short firstOffset,short secondOffset,
  1000.  OffsetTable offsets)
  1001.  = {0x2F3C,0x800E,0x001C,0xA8B5}; 
  1002. pascal void DrawJust(Ptr textPtr,short textLength,short slop)
  1003.  = {0x2F3C,0x8008,0x001E,0xA8B5}; 
  1004. pascal void MeasureJust(Ptr textPtr,short textLength,short slop,Ptr charLocs)
  1005.  = {0x2F3C,0x800C,0x0020,0xA8B5}; 
  1006. pascal Boolean ParseTable(CharByteTable table)
  1007.  = {0x2F3C,0x8204,0x0022,0xA8B5}; 
  1008. pascal short GetDefFontSize(void)
  1009.  = {0x3EB8,0x0BA8,0x6604,0x3EBC,0x000C}; 
  1010. #define GetSysFont() (* (short*) 0x0BA6)
  1011. #define GetAppFont() (* (short*) 0x0984)
  1012. #define GetMBarHeight() (* (short*) 0x0BAA)
  1013. #define GetSysJust() (* (short*) 0x0BAC)
  1014. pascal void SetSysJust(short newJust)
  1015.  = {0x31DF,0x0BAC}; 
  1016. pascal void ReadLocation(MachineLocation *loc)
  1017.  = {0x205F,0x203C,0x000C,0x00E4,0xA051}; 
  1018. pascal void WriteLocation(const MachineLocation *loc)
  1019.  = {0x205F,0x203C,0x000C,0x00E4,0xA052}; 
  1020. pascal void UprText(Ptr textPtr,short len)
  1021.  = {0x301F,0x205F,0xA054}; 
  1022. pascal void LwrText(Ptr textPtr,short len)
  1023.  = {0x301F,0x205F,0xA056}; 
  1024.  
  1025. /*  New for 7.0  */
  1026. pascal void LowerText(Ptr textPtr,short len)
  1027.  = {0x301F,0x205F,0xA056}; 
  1028. pascal void StripText(Ptr textPtr,short len)
  1029.  = {0x301F,0x205F,0xA256}; 
  1030. pascal void UpperText(Ptr textPtr,short len)
  1031.  = {0x301F,0x205F,0xA456}; 
  1032. pascal void StripUpperText(Ptr textPtr,short len)
  1033.  = {0x301F,0x205F,0xA656}; 
  1034.  
  1035. pascal StyledLineBreakCode StyledLineBreak(Ptr textPtr,long textLen,long textStart,
  1036.  long textEnd,long flags,Fixed *textWidth,long *textOffset)
  1037.  = {0x2F3C,0x821C,0xFFFE,0xA8B5}; 
  1038. pascal void GetFormatOrder(FormatOrderPtr ordering,short firstFormat,short lastFormat,
  1039.  Boolean lineRight,Ptr rlDirProc,Ptr dirParam)
  1040.  = {0x2F3C,0x8012,0xFFFC,0xA8B5}; 
  1041. pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
  1042.  = {0x2F3C,0x8204,0xFFFA,0xA8B5}; 
  1043. pascal OSErr InitDateCache(DateCachePtr theCache)
  1044.  = {0x2F3C,0x8204,0xFFF8,0xA8B5}; 
  1045. pascal String2DateStatus String2Date(Ptr textPtr,long textLen,DateCachePtr theCache,
  1046.  long *lengthUsed,LongDateRec *dateTime)
  1047.  = {0x2F3C,0x8214,0xFFF6,0xA8B5}; 
  1048. pascal String2DateStatus String2Time(Ptr textPtr,long textLen,DateCachePtr theCache,
  1049.  long *lengthUsed,LongDateRec *dateTime)
  1050.  = {0x2F3C,0x8214,0xFFF4,0xA8B5}; 
  1051. pascal void LongDate2Secs(const LongDateRec *lDate,LongDateTime *lSecs)
  1052.  = {0x2F3C,0x8008,0xFFF2,0xA8B5}; 
  1053. pascal void LongSecs2Date(LongDateTime *lSecs,LongDateRec *lDate)
  1054.  = {0x2F3C,0x8008,0xFFF0,0xA8B5}; 
  1055. pascal ToggleResults ToggleDate(LongDateTime *lSecs,LongDateField field,
  1056.  DateDelta delta,short ch,const TogglePB *params)
  1057.  = {0x2F3C,0x820E,0xFFEE,0xA8B5}; 
  1058. pascal FormatStatus Str2Format(ConstStr255Param inString,const NumberParts *partsTable,
  1059.  NumFormatString *outString)
  1060.  = {0x2F3C,0x820C,0xFFEC,0xA8B5}; 
  1061. pascal FormatStatus Format2Str(const NumFormatString *myCanonical,const NumberParts *partsTable,
  1062.  Str255 outString,TripleInt positions)
  1063.  = {0x2F3C,0x8210,0xFFEA,0xA8B5}; 
  1064. pascal FormatStatus FormatX2Str(extended80 x,const NumFormatString *myCanonical,
  1065.  const NumberParts *partsTable,Str255 outString)
  1066.  = {0x2F3C,0x8210,0xFFE8,0xA8B5}; 
  1067. pascal FormatStatus FormatStr2X(ConstStr255Param source,const NumFormatString *myCanonical,
  1068.  const NumberParts *partsTable,extended80 *x)
  1069.  = {0x2F3C,0x8210,0xFFE6,0xA8B5}; 
  1070. pascal Fixed PortionText(Ptr textPtr,long textLen)
  1071.  = {0x2F3C,0x8408,0x0024,0xA8B5}; 
  1072. pascal ScriptRunStatus FindScriptRun(Ptr textPtr,long textLen,long *lenUsed)
  1073.  = {0x2F3C,0x820C,0x0026,0xA8B5}; 
  1074. pascal long VisibleLength(Ptr textPtr,long textLen)
  1075.  = {0x2F3C,0x8408,0x0028,0xA8B5}; 
  1076. pascal short ValidDate(const LongDateRec *vDate,long flags,LongDateTime *newSecs)
  1077.  = {0x2F3C,0x820C,0xFFE4,0xA8B5}; 
  1078.  
  1079. /*  New for 7.0  */
  1080. pascal void NFindWord(Ptr textPtr,short textLength,short offset,Boolean leadingEdge,
  1081.  NBreakTablePtr nbreaks,OffsetTable offsets)
  1082.  = {0x2F3C,0x8012,0xFFE2,0xA8B5}; 
  1083. pascal short TruncString(short width,Str255 theString,TruncCode truncWhere)
  1084.  = {0x2F3C,0x8208,0xFFE0,0xA8B5}; 
  1085. pascal short TruncText(short width,Ptr textPtr,short *length,TruncCode truncWhere)
  1086.  = {0x2F3C,0x820C,0xFFDE,0xA8B5}; 
  1087. pascal short ReplaceText(Handle baseText,Handle substitutionText,Str15 key)
  1088.  = {0x2F3C,0x820C,0xFFDC,0xA8B5}; 
  1089. pascal short NPixel2Char(Ptr textBuf,long textLen,Fixed slop,Fixed pixelWidth,
  1090.  Boolean *leadingEdge,Fixed *widthRemaining,JustStyleCode styleRunPosition,
  1091.  Point numer,Point denom)
  1092.  = {0x2F3C,0x8222,0x002E,0xA8B5}; 
  1093. pascal short NChar2Pixel(Ptr textBuf,long textLen,Fixed slop,long offset,
  1094.  short direction,JustStyleCode styleRunPosition,Point numer,Point denom)
  1095.  = {0x2F3C,0x821C,0x0030,0xA8B5}; 
  1096. pascal void NDrawJust(Ptr textPtr,long textLength,Fixed slop,JustStyleCode styleRunPosition,
  1097.  Point numer,Point denom)
  1098.  = {0x2F3C,0x8016,0x0032,0xA8B5}; 
  1099. pascal void NMeasureJust(Ptr textPtr,long textLength,Fixed slop,Ptr charLocs,
  1100.  JustStyleCode styleRunPosition,Point numer,Point denom)
  1101.  = {0x2F3C,0x801A,0x0034,0xA8B5}; 
  1102. pascal Fixed NPortionText(Ptr textPtr,long textLen,JustStyleCode styleRunPosition,
  1103.  Point numer,Point denom)
  1104.  = {0x2F3C,0x8412,0x0036,0xA8B5}; 
  1105. #ifdef __cplusplus
  1106. }
  1107. #endif
  1108.  
  1109. #endif
  1110.